//显示购物车数量
import {
	mapGetters
} from 'vuex'
export default {
	computed: {
		...mapGetters('m_cart', ['checkedCount'])
	},
	methods: {
		setBadge() {
			uni.setTabBarBadge({
				index: 2,
				text: this.checkedCount + ''
			})
		}
	},
	watch: {
		checkedCount() {
			this.setBadge()
		}
	},
	onShow() {
		this.setBadge()

	}
}
